package com.common;

import java.text.DecimalFormat;

public class DecimalProcess {

	/**
	 * 将对象转换成数字
	 * @param input
	 * @return
	 */
	public static String convertToFormat(Object input,String format) {
		String ret = "0";
		if (input != null) {
			DecimalFormat df = new DecimalFormat(format); 
			ret = df.format(input);
		}

		return ret;
	}
}
